package com.zlzxm.shoesmarket.view.markview;

import android.content.Context;
import android.widget.TextView;

import com.github.mikephil.charting.components.MarkerView;
import com.github.mikephil.charting.data.Entry;
import com.github.mikephil.charting.highlight.Highlight;
import com.zlzxm.shoesmarket.R;

/**
 * Created by zlz
 * on  4/11/21
 */
public class MarkViewPrice extends MarkerView {


    private TextView tvPrice,tvDate;



    /**
     * Constructor. Sets up the MarkerView with a custom layout resource.
     *
     * @param context
     */
    public MarkViewPrice(Context context) {
        super(context, R.layout.layout_mark_price);

        tvPrice  = findViewById(R.id.tvPrice);
        tvDate  = findViewById(R.id.tvDate);

    }

    @Override
    public void refreshContent(Entry e, Highlight highlight) {
        super.refreshContent(e, highlight);

        tvPrice.setText("" + e.getY());
        tvDate.setText("" + e.getX());
    }
}
